# -*- coding: utf-8 -*-
'''
	FastAPI配置
'''
import uvicorn
from fastapi import FastAPI

app = FastAPI(
    debug=True,
    title="应用标题",
    description="应用描述",
    version = "1.0.1",
    docs_url = "/docs",
    redoc_url = "/redoc"
)

@app.get("/")
async def index():
	return {"code":200, "msg":"hello world!"}


@app.get("/demo" , summary="简介", description="描述")
async def demo():
	return {"code":200, "msg":"hello Demo!"}


if __name__ == '__main__':

    uvicorn.run(
        app     = 'example02-App配置:app', 
        host    = "0.0.0.0", 
        port    = 8080, 
        reload  = True
    )